package cn.edu.cug.cs.gtl.renders.openinventor.basics;


import cn.edu.cug.cs.gtl.apis.render.basics.Vec4f;
import com.openinventor.inventor.SbVec4f;

public class Vec4fImpl implements Vec4f {
    private SbVec4f nativeObject = null;
    public Vec4fImpl(){
        this.nativeObject = new SbVec4f();
    }

    public Vec4fImpl(SbVec4f v){
        this.nativeObject = v;
    }
    @Override
    public Object getNativeObject() {
        return nativeObject;
    }

    @Override
    public boolean attach(Object nativeObject) {
        if(nativeObject instanceof  SbVec4f){
            this.nativeObject = (SbVec4f) nativeObject;
            return true;
        }
        return false;
    }

    @Override
    public Object detach() {
        Object r = this.nativeObject;
        this.nativeObject=null;
        return r;
    }
}
